<include file="Public:header" />
<link rel="stylesheet" href="__PUBLIC__/Home/css/duobao.css" id="theme" />
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="__PUBLIC__/Home/js/form-validation.js"></script>
<div class='sep'></div>
<div class="autobox " style='margin-top:20px;'>
    <div class="left w215 ">
        <div class="user-panel">
            <div class="user-info">
                <dl>
                    <dt class='user-logo'>
                    <img src="https://www.a5.net/uc_server/images/noavatar_small.gif" onerror="this.onerror=null;this.src='https://www.a5.net/uc_server/images/noavatar_small.gif'"> <i></i>
                </dt>
                    <dd class='username'>
                        <a href="#">{$Think.session.user.username}</a>
                    </dd>
                    <!-- ￥ -->
                    <dd class="total"><i class='fa fa-rmb'></i> 交易额：</dd>
                    <dd class='total-money'>{$total1}元
                    </dd>
                </dl>
                <div class="dashedline"></div>
            </div>
            <ul class="deal-info">
                <li>
                    <a href="plugin.php?id=guarantee:guarantee&amp;item=status_4">
                        <div>交易中</div>
                        <div class='jiaoyi-count'> {$total2}</div>
                    </a>
                </li>
                <li style="border:none;">
                    <a href="plugin.php?id=guarantee:guarantee&amp;item=status_6">
                        <div>已结束</div>
                        <div class='jiaoyi-count'>{$total3}</div>
                    </a>
                </li>
            </ul>

            <div class="post-deal">
                <a class="btn" href="{:U('duobao/add')}" target="_blank">
                    <i class=' fa fa-plus-square-o'></i> 发起交易
                </a>
            </div>
            <div class="tips">
                <i class='fa fa-check-circle-o'></i> 安全 便捷 高效
            </div>
        </div>
        <div class="flow">
            <section class="con-side">
                <header>
                    <h2 class="f5">
                        <i class='fa fa-list-ol'></i> 担保交易流程
                    </h2>
                </header>
                <article class="flow-content">

                    <dl>
                        <dt>
                        <i class='step1' ></i>
                        </dt>
                        <dd>
                            <strong>发起交易</strong>
                            <span>只需一方发起即可</span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                        <i class='step2'></i>
                        </dt>
                        <dd>
                            <strong>对方接受</strong>
                            <span>点击按钮 接受交易</span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                        <i class='step3'></i>
                        </dt>
                        <dd>
                            <strong>买家付款</strong>
                            <span> 双方开始交易</span>
                        </dd>
                    </dl>
                    <dl class="p0">
                        <dt>
                        <i class='step4'></i>
                        </dt>
                        <dd>
                            <strong>交易结束</strong>
                            <span>每天10点和17点统一支付</span>
                        </dd>
                    </dl>
                </article>
            </section>
        </div>
    </div>
    <div class="left right-content">
        <div class="con-right-post">
            <div class="hd">
                <h2 class="left">
                    <i class='fa fa-pencil fa-fw'></i> 填写交易信息
                </h2>
            </div>
            <div class="bd">
                <form method="post" autocomplete="off" id="signupForm" action="{:U('danbao/save')}">
                    <div id="ct" class="duobao-form">
                        <div class="bm bw0 cl">

                            <div id="postbox">
                                <div class="specialpost s_clear">
                                    <dl>
                                        <dt>我的手机号：</dt>
                                        <dd>
                                            <input type="text" id="phone" name="phone" value="" placeholder='请输入手机号' class="con-right-post-input-1">
                                            <em class="srts"><i class=' fa fa-info-circle'></i>
                                        请填写手机号码</em>
                                        </dd>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>买卖关系：</dt>
                                        <dd>
                                            <label>
                                        <input type="radio" name="role" checked="checked" onclick="javascript:$('#real-name-panel').show();" value="1" id="mybuyer">
                                        我是买家
                                        </label>
                                        </dd>

                                        <dd>
                                            <label>
                                        <input type="radio" name="role" onclick="javascript:$('#real-name-panel').hide();" value="2" id="myseller" >
                                        我是卖家
                                    </label>
                                        </dd>
                                        <dd>
                                            <em class="srts">&nbsp;&nbsp;&nbsp;&nbsp;
                                        <i class=' fa fa-info-circle'></i>
                                        选择买卖关系
                                    </em>
                                        </dd>
                                        <div class="clear"></div>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>对方用户名：</dt>
                                        <dd>
                                            <input type="text" class="con-right-post-input-1" value="" placeholder='请输入对方的用户名...' id="otherSideUsername" name="other_side_username">
                                            <em class="srts">
                                                <i class=' fa fa-info-circle'></i>
                                        填写对方用户名
                                    </em>
                                        </dd>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>购买货币种类：</dt>
                                        <dd>
                                            <select name="coin_type" id="coinType" class='coinType'>
                                                <volist name="coins" id="vo">
                                                    <option value='{$vo.id}'>{$vo.title}</option>
                                                </volist>
                                            </select>
                                            <em class="srts">
                                                <i class=' fa fa-info-circle'></i>
                                        请选择购买的货币种类
                                    </em>
                                        </dd>
                                    </dl>

                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>购买货币价格：</dt>
                                        <dd>
                                            <input type="text" placeholder="请输入货币价格,不能低于10元" class="con-right-post-input-1" oninput="priceChanged({$agency_fee_pay_percent});" name="coin_price" id="coinPrice">
                                            <em class="srts">
                                                <i class=' fa fa-info-circle'></i>
                                        请选择购买的货币价格
                                    </em>
                                        </dd>
                                    </dl>

                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>购买货币数量：</dt>
                                        <dd>
                                            <input type="text" placeholder="交易金额 不能低于1个" oninput="priceChanged({$agency_fee_pay_percent});" class="con-right-post-input-1" name="coin_count" id="coinCount">
                                            <em class="srts">
                                                <i class=' fa fa-info-circle'></i>
                                                请选择购买的货币数量
                                    </em>
                                        </dd>
                                    </dl>

                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>中介费{$agency_fee_pay_percent}%：</dt>
                                        <dd class="zj">
                                            <label>
                                        <input type="radio" 
                                        onclick="priceChanged({$agency_fee_pay_percent},1);" 
                                        name="agency_fee_pay_type"  value="1" checked="checked">
                                        买家支付
                                    </label>
                                            <label>
                                        <input type="radio" 
                                        onclick="priceChanged({$agency_fee_pay_percent},2);" name="agency_fee_pay_type" value="2">
                                        卖家支付
                                    </label>
                                            <label>
                                        <input type="radio" 
                                        onclick="priceChanged({$agency_fee_pay_percent},3);" name="agency_fee_pay_type" value="3">
                                        双方平摊
                                    </label>
                                            <label>
                                        <input type="radio" 
                                        onclick="priceChanged({$agency_fee_pay_percent},4);" name="agency_fee_pay_type" value="4">
                                        双向收取（公众号）
                                    </label>
                                        </dd>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl><dt>&nbsp;</dt>
                                        <dd>
                                            <div class="total-c">
                                                <p>
                                                    <span id='buyer-title'>
                                                            买家应付：
                                                    </span>
                                                    <em id="order_amount">0元</em> &nbsp;
                                                    <span id='seller-title'>卖家所得：</span>
                                                    <em id="sale_gains">0元</em>
                                                </p>
                                            </div>
                                        </dd>
                                    </dl>
                                    <div id='real-name-panel'>
                                        <div class="clear"></div>
                                        <div class="blank10"></div>
                                        <div class="blank5"></div>
                                        <dl id="buyuserName"><dt>真实姓名：</dt>
                                            <dd class="zj">
                                                <input type="text" name="real_name" id="realName" value="" placeholder='请输入买家的真是姓名' class="con-right-post-input-1">
                                            </dd>
                                        </dl>
                                    </div>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>

                                    <dl><dt>交易规则：</dt>
                                        <dd class="mm">
                                            <label>
                                        <input type="checkbox" value="1" name="agree" id="agree">
                                        <a href="/article-1-1.html" target="_blank"><u style="color:red;">同意交易规则</u></a>
                                    </label>
                                        </dd>
                                        <div class="clear"></div>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <dl id="businessMark"><dt>交易备注：</dt>
                                        <textarea placeholder='请输入交易的详细信息' name="business_mark" id="buyuserNameText" class="zj business-mark-textarea"></textarea>
                                        <div class="clear"></div>
                                    </dl>
                                    <div class="clear"></div>
                                    <div class="blank10"></div>
                                    <div class="blank5"></div>
                                    <input type="submit" class="save-deal-btn" id='save-btn' value="保存交易">
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
<script src="__PUBLIC__/Home/js/duobao.js"></script>
<include file="Public:footer" />